


!--------------------------------------------------------------------------------------------------------!
!---------------------------------------------------------------------------------------------------------!
    module globalvalues
      use precisions
     ! use types_generic 
      
      implicit none

      integer, parameter :: numParamsCombGlob = 411 
      integer, parameter :: numPeeps = 2848 
      integer :: whichGuy
      logical, parameter :: fullPrinting = .true.
      integer, parameter :: printingGlob =1 !2 full, 1 light, 0 none.      

      ! Grids
     integer, parameter :: assGlob =50 
     integer, parameter :: consGridGlob = 2 ! just for bounds - make sure doLocalAfterGrid is set to .true.
     integer, parameter :: annPointsGlob = 10
     integer, parameter :: incYGlob = 1 
     integer, parameter :: incOGlob = annPointsGlob !IT IS ESSENTIAL THAT THIS IS NOT CHANGED
     
     integer, parameter :: yearsGlob = 52 
     real (kind=rk) :: assMinGlob = 0.0_rk
     
     
     ! Parameters
     real (kind=rk), parameter :: freeMinConsGlob = 0.001_rk

     ! Technology
     real (kind=rk), parameter :: rGlob = 0.0_rk 
     real (kind=rk), parameter :: annAdminLoadGlob = 0.175_rk
     logical, parameter :: survProbOnGlob = .true. ! keep this to true otherwise can't overwrite and put on 
     integer, parameter :: retireAgeGlob = 2 !65- 19 !98-19 !
     logical, parameter :: annOnGlob = .true.

     
     
     

     

     logical, parameter :: SSonGlob =.true.
     real (kind=rk) :: SSlevelGlob 

     ! Features of computation and simulation
     integer, parameter :: numSimsGlob = 1
     logical, parameter :: doLocalAfterGrid = .true.
     real (kind=rk) :: startAGlob 
          
     ! Features of printing 

     logical, parameter :: printYearUpdatesGlob = .false.
     logical, parameter :: printAllStatesGlob = .false.
     logical, parameter :: printMicroData = .true.
     


       
       !! OpenMP
        integer :: TID
        logical :: scratch, scratch1
        real (kind=rk) :: scratchRK
!---------------------------------------------------------------------------------------------------------!
!----------------------------------------------------------------------------------------------------------------!      
!----------------------------------------------------------------------------------------------------------------!      
contains     

  subroutine getpaths(path_in, path_out, paramComb)
          implicit none
          character (130), intent (out) :: path_in
          character (130), intent (out), optional :: path_out
          integer, intent(in), optional :: paramComb

          
          character(80) :: stringtypetorun
          

          
          path_in = 'C:\Users\co337\Dropbox\Annuities adapted code\FortranCode\input\replication\'
          if (present(path_out)) then    
          if (present(paramComb)) then
                write (stringtypetorun, '(I10)') paramComb       
                path_out =  'C:\Users\co337\Dropbox\Annuities adapted code\FortranOutput\finalRep\A' // trim(adjustl(stringtypetorun)) // '\'    !added A to avoid overwriting              
              else
                 write(*,*) 'Trying to do multiple paths, but have not given number that indicates subfolder'
                 stop
              end if
          end if
          

          
          
          
        end subroutine getpaths

     
    end module globalvalues
